﻿using Library.Collections.Generic;
using Library.Logic.Constraints;
using Library.Logic.Inference;
using TRULE = System.Linq.Expressions.Expression<System.Func<System.Linq.IQueryable<System.Linq.Expressions.Expression>, System.Collections.Generic.IEnumerable<System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression>>>>;
using TEXPRESSION = System.Linq.Expressions.Expression;

namespace Library.Logic
{
    public class Set : ISet 
    {
        class SetProvider : ISetProvider
        {
            public ISetReadOnly CreateSet(/*TEXPRESSION expression,*/ IConstraintsReasonReadOnly constraints)
            {
                throw new System.NotImplementedException();
            }
        }
        static SetProvider provider = new SetProvider();
        public ISetProvider Provider
        {
            get { return provider; }
        }

        internal Set()
        {
            
        }
        internal Set(IConstraintsReason elementConstraints)
        {
            this.elementConstraints = elementConstraints;
        }

        IConstraintsReason elementConstraints;
        public IConstraintsReason ElementConstraints
        {
            get { return elementConstraints; }
        }
        IConstraintsReasonReadOnly IHasElementConstraintsReasonReadOnly.ElementConstraints
        {
            get { return elementConstraints; }
        }
        IConstraintsReadOnly IHasElementConstraintsReadOnly.ElementConstraints
        {
            get { return elementConstraints; }
        }
        IConstraints IHasElementConstraints.ElementConstraints
        {
            get { return elementConstraints; }
        }

        public bool Contains(object[] item, out IInference argument)
        {
            return elementConstraints.Validate(item, out argument);
        }
        public bool Contains(object[] item)
        {
            return elementConstraints.Validate(item);
        }
    }
}
